﻿using System;
using System.Collections.Generic;
using Model;
namespace BLL
{
    #region class BZKZ
    /// <summary>
    /// Interface:ZKZ Interface
    /// Author:wxc
    /// DateTime:2021/5/27 11:16:40
    /// </summary>	
    public class BZKZ
    {
        #region Add Method
        /// <summary>
        /// Insert an item
        /// </summary>
        /// <param name="ZKZ"></param>
        /// <returns>count of rows affected</returns>
        public int AddZKZ(ZKZEntity ZKZ)
        {
            DAL.DALZKZ dal = new DAL.DALZKZ();
            return dal.AddZKZ(ZKZ);
        }
        #endregion
        #region Mod Method
        /// <summary>
        /// Update an item
        /// </summary>
        /// <param name="ZKZ"></param>
        /// <returns>count of rows affected</returns>
        public int ModZKZ(ZKZEntity ZKZ)
        {
            DAL.DALZKZ dal = new DAL.DALZKZ();
            return dal.ModZKZ(ZKZ);
        }
        #endregion
        #region Del Method
        /// <summary>
        /// Del an item by primary key
        /// </summary>
        /// <param name="iD"></param> 
        /// <returns>count of rows affected</returns>
        public int DelZKZ(string iD)
        {
            DAL.DALZKZ dal = new DAL.DALZKZ();
            return dal.DelZKZ(iD);
        }
        #endregion
        #region Select Method
        /// <summary>
        /// Select an item by Primarykey
        /// </summary>
        /// <param name="iD"></param>
        /// <returns>an item</returns>
        public ZKZEntity GetZKZ(string iD)
        {
            DAL.DALZKZ dal = new DAL.DALZKZ();
            return dal.GetZKZ(iD);
        }
        #endregion
        #region Select_All Method
        /// <summary>
        /// Select all items
        /// </summary>
        /// <returns>items</returns>
        public IList<ZKZEntity> GetZKZs()
        {
            DAL.DALZKZ dal = new DAL.DALZKZ();
            return dal.GetZKZs();
        }
        #endregion
        #region public common select by conditions ,we can use it by changing the GetZKZsbyCondition(datatype condition) and sql
        /// <summary>
        /// Select items by Columns
        /// </summary>
        /// <param name="columns name"></param>
        /// <returns>items</returns>
        public IList<ZKZEntity> GetZKZsbyCondition(string sql)
        {
            DAL.DALZKZ dal = new DAL.DALZKZ();
            return dal.GetZKZsbyCondition(sql);
        }
        #endregion
        #region Select items Top n
        /// <summary>
        /// Select items by Columns
        /// </summary>
        /// <param name="columns name"></param>
        /// <returns>items</returns>
        public IList<ZKZEntity> GetZKZsTopN(int n)
        {
            DAL.DALZKZ dal = new DAL.DALZKZ();
            return dal.GetZKZsTopN(n);
        }
        #endregion
    }
    #endregion
}
